package com.snj.bestdealer.lib;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

import android.content.SharedPreferences;

public class Global {
	
	public static String pkgname = "com.snj.bestdealer";
	public static SharedPreferences pref = null;
	
	public static String devicekey = "";
	
	public static String usremail = "";
	public static String usrpassword = "";
	
	public static final String baseurl = "http://snjcommunication.cafe24.com/bd/";
	public static final String versionurl = baseurl + "getversion.php";
	public static final String joinurl = baseurl + "join.php";
	public static final String loginurl = baseurl + "login.php";
	public static final String newsurl = baseurl + "getnews.php";
	public static final String getbrandurl = baseurl + "getbrand.php";
	public static final String getmodelurl = baseurl + "getmodel.php";
	
	
	
	
	public static boolean isValidEmail(String email) {
		boolean err = false;
		String regex = "^[_a-z0-9-]+(.[_a-z0-9-]+)*@(?:\\w+\\.)+\\w+$";

		Pattern p = Pattern.compile(regex);
		Matcher m = p.matcher(email);
		if( !m.matches() ) {
		    err = true; 
		}
		return err;
	}
}


